<template>
  <div class="control-container">
    <div class="cyber-border">
      <h2 class="cyber-title">大屏控制中心</h2>
      <div class="control-panel">
        <div class="panel-left">
          <div class="hologram-display"></div>
        </div>
        <div class="panel-right">
          <div class="control-item" v-for="item in controls" :key="item.id">
            <div class="control-label">{{ item.label }}</div>
            <el-switch
              v-model="item.value"
              active-color="#00ff88"
              inactive-color="#ff003c"
              :class="item.value ? 'glow-on' : ''"
            />
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'

const controls = ref([
  { id: 1, label: '总览大屏', value: true },
  { id: 2, label: '安防监控', value: false },
  { id: 3, label: '数据同步', value: true },
  { id: 4, label: '报警系统', value: false }
])
</script>

<style lang="scss" scoped>
.control-container {
  padding: 20px;
}

.control-panel {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
}

.hologram-display {
  height: 500px;
  background: rgba(0,0,0,0.3);
  border: 2px solid #409EFF;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  
  &::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
      transparent 48%, 
      rgba(64,158,255,0.1) 50%,
      transparent 52%);
    animation: hologram 3s linear infinite;
  }
}

.control-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  margin-bottom: 15px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  transition: all 0.3s;

  &:hover {
    transform: translateX(10px);
    box-shadow: 0 0 15px rgba(64,158,255,0.2);
  }
}

.glow-on {
  :deep(.el-switch__core) {
    box-shadow: 0 0 10px #00ff88;
  }
}

@keyframes hologram {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}
</style> 